<?php

  $layoutId = $cgi->getValue ( "id" );

  $rows = $sql->execute ( "SELECT * FROM " . $property_table . " WHERE id=" .
    $sql->quote ( $layoutId ) . " AND propertyshow=1 LIMIT 1",
    SQL_RETURN_ASSOC );
  $row = $rows [ 0 ];


?>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> 
<tr valign="top">
  <td colspan="2" valign="top"><table width="100%" border="0"  align="center" cellpadding="0" cellspacing="0" class="lvp_top_nav_menu_bg">
    <tr valign="middle">
<td><p><?php echo LVP_PROPERTY_REF; ?> <strong><?php echo $row [ "propertyref" ]; ?></strong> - <?php echo $row [ "propertyaddress" ]; ?></p></td>
<td align="right" valign="top">  <a href="javascript:history.go(-1)"><img src="<?php print "$LanguageFolder/$language_pack"; ?>/buttons/button-back.gif" border="0" /></a></td>
</tr>
</table>
<br />
<p align="center"><?php echo LVP_INFORMATION_TEXT; ?></p>
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td><?php   if ( ! $row [ 'propertyphoto1' ] )
  {
    ?><img src="<?php echo $ImageURL; ?>nopropertyimage.jpg" /><?php
  }
  else
  {
    ?>
<p align="center"><img src="<?php echo $ImageURL; ?><?php
    echo $row [ "propertyphoto1" ]; ?>" /></p><?php }?></td>
<td>
<?php    if ( $row [ 'propertyphoto2' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto2" ];?>"></p>
<?php }?></td></tr>
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td><?php    if ( $row [ 'propertyphoto3' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto3" ];?>"></p>
<?php }?></td>
<td><?php    if ( $row [ 'propertyphoto4' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto4" ];?>"></p>
<?php }?></td>
</tr>
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td><?php    if ( $row [ 'propertyphoto5' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto5" ];?>"></p>
<?php }?></td>
<td><?php    if ( $row [ 'propertyphoto6' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto6" ];?>"></p>
<?php }?></td>
</tr>
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td><?php    if ( $row [ 'propertyphoto7' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto7" ];?>"></p>
<?php }?></td>
<td><?php    if ( $row [ 'propertyphoto8' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto8" ];?>"></p>
<?php }?></td>
</tr>
</table>
<br />
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td><?php    if ( $row [ 'propertyphoto9' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto9" ];?>"></p>
<?php }?></td>
<td><?php    if ( $row [ 'propertyphoto10' ] )
  { ?>
<p align="center">
<img src="<?php echo $ImageURL; ?><?php echo $row [ "propertyphoto10" ];?>"></p>
<?php }?></td>
</tr>
</table></td>
</tr>
<br />
<?php ?></td>
</tr>
</table></td>
</tr>
<br />
</table>
